﻿using System;
using Com.PhilChuang.Pmvp.Model.Services;
using Com.PhilChuang.Pmvp.Model.Services.Impl;
using Com.PhilChuang.Utils;
using Com.PhilChuang.Utils.Mobile;

namespace Com.PhilChuang.Pmvp.Utils
{
	public static class PmvpWp7ServiceLocator
	{
		public static void AddServices (IServiceLocator locator)
		{
			// utility classes
			locator.AddMapping (typeof (IAppFile), typeof (AppFileWp7Impl), true);

			// services
			locator.AddMapping (typeof (ITransientAppStateService), typeof (TransientAppStateService), true);
			locator.AddMapping (typeof (IPersistentAppStateService), typeof (PersistentAppStateService), true);
			locator.AddMapping (typeof (IExceptionLogService), typeof (ExceptionLogService), true);
			locator.AddMapping (typeof (ISendMessageService), typeof (SendMessageService), true);
			locator.AddMapping (typeof (ISendEmailService), typeof (SendEmailService), true);
			locator.AddMapping (typeof (ILaunchMarketplaceAppDetailsService), typeof (LaunchMarketplaceAppDetailsService), true);
			locator.AddMapping (typeof (ILaunchLinkService), typeof (LaunchLinkService), true);
		}
	}
}
